/*
 * @Author: sunzhijun 
 * @Date: 2019-07-30 15:09:50 
 * @Last Modified by: sunzhijun
 * @Last Modified time: 2019-10-10 16:35:48
 */
import React from 'react';
import { base } from 'nc-lightapp-front';
import {render, connect} from 'src/hrpub/common/frame';
// import nodeRefs from '../../container/functions/nodeRefs';
import './index.less';
let count = 1;

const Footer = render({
    
})(({props, state}) => {
    const { NCTabs } = base;
    const NCTabPane = NCTabs.NCTabPane;
    const { editTable, search, action, main, meta } = props;
    const { NCCreateSearch } = search;
    let { isChecked, areaCodeList, formLists, height, activeKey, isSort} = main;
    return (
        <div className="footer" 
            // style={{height: `${main.height}`, display: `${main.isShowSub ? '' : 'none'}`}}
            style={{height: `${height}`, display: !isSort ? '' : 'none'}}
        >
            <NCTabs 
                activeKey={activeKey}
                onChange={action.tableAct.changeTab}
                extraContent={
                    <div style={{width: '50px', height: '30px'}}></div>
                }
            >
                {
                    !!areaCodeList.length && areaCodeList.map((item, index)=>{
                        if(!formLists.includes(item)){
                            return (
                                <NCTabPane 
                                    tab={action.tableAct.renderName(item)}
                                    key={index}>
                                    {
                                        editTable.createEditTable(item, {
                                            adaptionHeight:true,
                                            cancelCustomRightMenu: true
                                        })
                                    }
                                </NCTabPane>
                            )
                        }
                    })
                }
            </NCTabs>

            {/* {action.tableAct.renderSubMenu()} */}
        </div>
    );
});


export default Footer;